package assem;

import temp.Temp;
import temp.TempList;
import temp.TempMap;

public class MOVE extends Instr {
	TempList dst, src;
	
	public MOVE(String a, Temp d, Temp s) {
		assem = a;
		dst = new TempList(d, null);
		src = new TempList(s, null);
	}
	
	public TempList def() {
		return dst;
	}

	@Override
	public String format(TempMap m) {
		String out = new String(assem);
		out = out.replace("'d0", m.tempMap(dst.head));
		out = out.replace("'s0", m.tempMap(src.head));
		return out;
	}

	public Targets jumps() {
		return null;
	}

	public TempList use() {
		return src;
	}

}
